package weak_20241227_29.stream;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author zdl
 * @date 2024/12/27
 */
public class Demo5 {
    public static void main(String[] args) {
        //5. 将字符串列表中的每个元素转换为大写并收集到新的列表
        ArrayList<String> list = new ArrayList<>();
        list.add("asd");
        list.add("qWe");
        list.add("uio");
        List<String> collect = list.stream().map(s -> s.toUpperCase()).collect(Collectors.toList());
        System.out.println(collect);
    }
}
